<?php


namespace App\Request\client;


use App\Request\CommonRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class AccountRequest extends CommonRequest
{
    protected $name = '用户信息上报验证';

    protected $rule = [
        'appUploadAccountInfo' => [
            'phone' => 'required|max:255',
        ],
        'appUploadAccountError' => [
            'phone' => 'required|max:255',
            'is_restrict' => 'required|max:255',
            'restrict_time' => 'required|max:255',
        ]
    ];

    protected $message = [
        'phone.required' => '用户手机号码不能为空',
        'is_restrict.required' => '限制状态不能为空',
        'restrict_time.required' => '限制时间不能为空',
        'restrict_content.required' => '限制原因不能为空',
        'sex.required' => '性别不能为空',
        'title.required' => '主体不能为空',
    ];


    /**
     * 验证
     * @param array $params
     * @param string $scenes
     * @return bool
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function validated(array $params, string $scenes): bool
    {
        return $this->__validated($params, $scenes);
    }
}